/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 说明：
 * Entity Name 商店会员级别定义表
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TShopMemberLevel")
public class TShopMemberLevel implements Serializable{

	private static final long serialVersionUID = 1L;

	private String LevelID;//级别编号CHAR(15) PK
	
	private String Name;//级别名称VARCHAR(64)
	
	private boolean IsDiscount;//是否有折扣
	
	private double Discount;//折扣DECIMAL(20,3)
	
	private int Walve;//阀值INTEGER 如为-1则表示会员级别不是由积分自动决定的
	
	private int Level;//级别 级别从1开始，越大表示级别越高
	
	private byte WalveType;//阀值类型TINYINT
	
	private String Des;//会员权限描述VARCHAR(10240)
	
	private byte Type;//类型TINYINT 1为系统级别 2为商家自定义级别
	
	private Set<TUser> TUsers=new HashSet<TUser>(0);

	@Id
	@Column(name = "LevelID", length=15)
	public String getLevelID() {
		return LevelID;
	}

	public void setLevelID(String levelID) {
		LevelID = levelID;
	}

	@Column(name = "Name")
	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	@Column(name = "IsDiscount")
	public boolean isIsDiscount() {
		return IsDiscount;
	}

	public void setIsDiscount(boolean isDiscount) {
		IsDiscount = isDiscount;
	}

	@Column(name = "Discount", precision = 20, scale = 3)
	public double getDiscount() {
		return Discount;
	}

	public void setDiscount(double discount) {
		Discount = discount;
	}

	@Column(name = "Walve")
	public int getWalve() {
		return Walve;
	}

	public void setWalve(int walve) {
		Walve = walve;
	}

	@Column(name = "Level")
	public int getLevel() {
		return Level;
	}

	public void setLevel(int level) {
		Level = level;
	}

	@Column(name = "WalveType")
	public byte getWalveType() {
		return WalveType;
	}

	public void setWalveType(byte walveType) {
		WalveType = walveType;
	}

	@Column(name = "Des", length=1024)
	public String getDes() {
		return Des;
	}

	public void setDes(String des) {
		Des = des;
	}

	@Column(name = "Type")
	public byte getType() {
		return Type;
	}

	public void setType(byte type) {
		Type = type;
	}
	
	@OneToMany(mappedBy="TShopMemberLevel")//, fetch=FetchType.EAGER
	@JoinColumn(name="LevelID")
	public Set<TUser> getTUsers() {
		return TUsers;
	}

	public void setTUsers(Set<TUser> tUsers) {
		TUsers = tUsers;
	}
	
}
